package day6homework;

import org.junit.Test;

public class RectangleTest {
	@Test
	public void test(){
	//定义一个只传入一个参数的对象
	Rectangle rectangle = new Rectangle(3);
	int perimeter = rectangle.getPerimeter();
	System.out.println(perimeter);
	//定义一个传入两个参数的对象
	rectangle = new Rectangle(4,6);
	int area = rectangle.getArea();
	System.out.println(area);
	//定义一个无参的对象
	rectangle = new Rectangle();
	int area1 = rectangle.getArea();
	System.out.println(area1);
	}
	
}
